package org.wlw;

public class Person {
    private String name;
    private int age;

    public void show() {
        System.out.println(name+":"+age);
    }
    //getter 和 setter
    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return this.name;
    }

    public void setAge(int age) {
        if(age<10) {
            this.age = 0;
        } else{
            this.age = age;
        }
    }

    public int getAge() {
        return this.age;
    }
}
